# _*_ coding:utf-8 _*_
__author__ = 'jiangchao'
__date__ = '2017/4/21 0021 下午 9:33'
import xadmin
from xadmin import views
from .models import Blog


class BaseSetting(object):
    enable_themes = True
    use_bootswatch = True


class GlobalSetting(object):
    site_title = u'三答不溜'
    site_footer = u'三答不溜IT付费问答博客'
    menu_style = 'accordion'


class BlogAdmin(object):
    list_display = ['title', 'desc']
    search_fields = ['title', 'desc']
    list_filter = ['title', 'desc']


xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSetting)
xadmin.site.register(Blog, BlogAdmin)
